from django.urls import re_path, include
from django.urls import path
from rest_framework.routers import SimpleRouter

from system.views.auth import TempTokenView, RegisterView, LoginView, LogoutView, RefreshTokenView, CaptchaView
# from system.views.auth import 检查是否已经注册View,发送短信View
from system.views.config import SystemConfigView, UserPersonalConfigView
from system.views.dept import DeptView
from system.views.loginlog import UserLoginLogView
from system.views.menu import UserRoutesView, MenuView
from system.views.modelfield import ModelLabelFieldView
from system.views.notice import NoticeUserReadMessageView, NoticeMessageView, UserNoticeMessage
from system.views.operationlog import OperationLogView
from system.views.permission import DataPermissionView
from system.views.role import RoleView
from system.views.upload import UploadView
from system.views.user import UserView
from system.views.userinfo import UserInfoView
from . import views

router = SimpleRouter(False)

no_auth_url = [
    re_path('^checkkk$', views.检查是否已经注册View.as_view(), name='检查是否已经注册'),
    # path('checkkk/<str:username>/<str:phone>/', checkkkRegisterView.as_view(), name='检查是否已经注册'),
    # re_path(r'^checkkk/(?P<username>\w+)/(?P<phone>\w+)/$', checkkkRegisterView.as_view(), name='检查是否已经注册'),
    # re_path('^sms_codes$', 发送短信View.as_view(), name='发送短信'),

    re_path(r'^sms_codes/(?P<mobile>1[3-9]\d{9})$', views.发送短信View.as_view()),
    
]

urlpatterns = no_auth_url
